package com.yeping.controller;

import com.yeping.domain.ResponseResult;
import com.yeping.domain.dto.AddArticleDto;
import com.yeping.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/book")
public class BookController {
    @Autowired
    private BookService bookService;

    @GetMapping("/bookAll")
    public ResponseResult bookAll(){
        return bookService.bookAll();
    }

    @GetMapping("/bookSearch")
    public ResponseResult bookSearch(String keyWord){
        return bookService.bookSearch(keyWord);
    }
}
